function validate_for_integers(inputfield, inputevent, zipcode) {
	var key;
	var keychar;

	if (zipcode.value.length == 5) {
		if (window.event) {
			key = window.event.keyCode;
		} else if (inputevent) {
			key = inputevent.which;
		} else {
			return true;
		}

		keychar = String.fromCharCode(key);
		// control keys
		if ((key==null) || (key==0) || (key==8) ||
    			(key==9) || (key==13) || (key==27)) {
			return true;

		// numbers
		} else if (("0123456789-").indexOf(keychar) > -1) {
			return true;
		} else {
			return false;
		}
	} else {
		if (window.event) {
			key = window.event.keyCode;
		} else if (inputevent) {
			key = inputevent.which;
		} else {
			return true;
		}

		keychar = String.fromCharCode(key);
		// control keys
		if ((key==null) || (key==0) || (key==8) ||
    			(key==9) || (key==13) || (key==27)) {
			return true;

		// numbers
		} else if (("0123456789").indexOf(keychar) > -1) {
			return true;
			
		} else {
			return false;
		}
	}
} // 